package com.scs.application.modules.dept.service;

import com.alibaba.fastjson.JSONArray;
import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.base.entity.Dept;
import com.scs.application.modules.base.entity.Location;
import com.scs.application.modules.base.entity.Warehouse;
import com.scs.application.modules.dept.entity.Use;
import com.scs.application.modules.fsd.entity.FsdUser;
import com.scs.application.modules.wm.entity.Transfer;
import com.scs.application.modules.wm.entity.TransferItem;
import com.scs.application.modules.wm.entity.WorkOrder;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 科室消耗单主表 Service
 * </p>
 */

public interface UseService extends IBaseService<Use> {

    /**
     * 打印预览
     * @param id
     * @param response
     */
    void preview(String id, HttpServletResponse response);
    List<WorkOrder> convertUseToOrders(Use use);

    Map getDeptUse(String code);

    /**
     * 调拨出库产生记账单
     * @param transfer
     * @param transferItems
     */
    void createByTransfer(Transfer transfer, List<TransferItem> transferItems);

    /**
     * 调拨出库产生记账单
     * @param fsdUser 智能柜用户
     * @param warehouse 二级库存地
     * @param location 智能柜
     * @param dept 科室
     * @param flagUseRed 是否冲红
     * @param rfidArr
     */
    Use createByFsd(FsdUser fsdUser, Warehouse warehouse, Location location, Dept dept, boolean flagUseRed, JSONArray rfidArr);
}
